#!/bin/bash

#
# Copyright (c) Vladimir Likic 2005-2011
#

source PATH_PARAMETERS
source RUN_PARAMETERS

# -------------------------------------
# choose CLUSTAL and TCOFFEE alignments
# -------------------------------------

ENABLE_CLUSTAL=Y
ENABLE_TCOFFEE=N

for seq_name in $SEQUENCES
do
  echo -ne "\n----------------------\n"
  echo -ne " Working on $seq_name\n"
  echo -ne "----------------------\n"

  if [ $ENABLE_CLUSTAL == "Y" ]; then
    echo -ne "\nRunning Clustalw\n"
    $CLUSTALW -outfile=$MSF_DIR/$seq_name.w -output=gcg \
        -infile=$SEQ_DIR/$seq_name.fas > $OUTPUT_DIR/$seq_name.out.w 2>&1
  fi

  if [ $ENABLE_TCOFFEE == "Y" ]; then
    echo -ne "\nRunning TCoffee\n"
    $TCOFFEE -outfile=$MSF_DIR/$seq_name.t -output=gcg \
        -infile=$SEQ_DIR/$seq_name.fas -newtree=$SEQ_DIR/$seq_name.dnd \
        > $OUTPUT_DIR/$seq_name.out.t 2>&1
  fi
done

echo -ne "\nAll done\n\n"

